home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 May / Macworld (1998-05).dmg / Games World / Shareware Games / Arcade / Supreme Commander / Supreme Commander.mac / 00001.ls next >
Encoding:
Text File  |  1996-01-30  |  16.1 KB  |  666 lines

  1. on startMovie
  2.   initialize()
  3. end
  4.  
  5. on initialize
  6.   global shaker, hole1, hole2, hole3, loop, launchnum, checklaunch, unibomber, occupied, destination, retractable, topupied, howdead, pullin, flywhere, hereyouis, flash, whichway, virex, attackearth, overdrive, ZING, donothing, HELLHOLE, beenhere
  7.   set beenhere to 0
  8.   set HELLHOLE to 0
  9.   set donothing to 0
  10.   set ZING to 0
  11.   set overdrive to 150
  12.   set attackearth to 0
  13.   set virex to 0
  14.   set howdead to 0
  15.   set whichway to 0
  16.   set flash to 0
  17.   set hereyouis to 0
  18.   set flywhere to 0
  19.   set pullin to 0
  20.   set topupied to 0
  21.   set retractable to 0
  22.   set destination to 0
  23.   set unibomber to 0
  24.   set occupied to 0
  25.   set checklaunch to 0
  26.   set launchnum to 113
  27.   set loop to 0
  28.   set shaker to 0
  29.   set the stageColor to 255
  30.   killthepuppets()
  31.   seeyou()
  32.   channelhider()
  33. end
  34.  
  35. on channelhider
  36.   set the visible of sprite 39 to 0
  37.   set the visible of sprite 43 to 0
  38.   set the visible of sprite 44 to 0
  39.   set the visible of sprite 45 to 0
  40.   set the visible of sprite 46 to 0
  41.   set the visible of sprite 47 to 0
  42.   set the visible of sprite 48 to 0
  43.   updateStage()
  44. end
  45.  
  46. on rattler
  47.   global shaker
  48.   set s to random(3)
  49.   if shaker = 1 then
  50.     exit
  51.   else
  52.     if s = 1 then
  53.       topshaker()
  54.     else
  55.       if s = 2 then
  56.         bottomshaker()
  57.       else
  58.         if s = 3 then
  59.           backshaker()
  60.         end if
  61.       end if
  62.     end if
  63.   end if
  64. end
  65.  
  66. on killthepuppets
  67.   repeat with x = 1 to 48
  68.     puppetSprite(x, 0)
  69.   end repeat
  70.   puppetSound(0)
  71.   set the volume of sound 1 to 255
  72.   set the volume of sound 2 to 255
  73.   updateStage()
  74. end
  75.  
  76. on seeyou
  77.   repeat with x = 1 to 48
  78.     set the visible of sprite x to 1
  79.   end repeat
  80. end
  81.  
  82. on wait howlong
  83.   startTimer()
  84.   repeat while the timer < howlong
  85.     nothing()
  86.   end repeat
  87. end
  88.  
  89. on whipitoutTOP
  90.   global origh, origv, GHOR, GVERT, puller, occupied, topupied, HELLHOLE
  91.   puppetSprite(puller, 1)
  92.   set the constraint of sprite 12 to 15
  93.   repotop()
  94.   repeat while the mouseDown
  95.     set delth to the mouseH - GHOR
  96.     set deltv to the mouseV - GVERT
  97.     set the locV of sprite 12 to origv + deltv
  98.     set the locH of sprite 12 to origh + delth
  99.     set the visible of sprite 17 to 0
  100.     highlighter()
  101.     updateStage()
  102.     if (the locV of sprite 12 > 217) and (the mouseH > 186) then
  103.       set the visible of sprite 14 to 1
  104.       set the visible of sprite 13 to 0
  105.       set the visible of sprite 12 to 0
  106.       updateStage()
  107.       next repeat
  108.     end if
  109.     if (the locV of sprite 12 > 217) and (the mouseH < 186) then
  110.       set the visible of sprite 14 to 0
  111.       set the visible of sprite 12 to 0
  112.       set the visible of sprite 13 to 1
  113.       updateStage()
  114.       next repeat
  115.     end if
  116.     if the locV of sprite 12 < 217 then
  117.       set the visible of sprite 14 to 0
  118.       set the visible of sprite 13 to 0
  119.       set the visible of sprite 12 to 1
  120.       updateStage()
  121.     end if
  122.   end repeat
  123.   puppetSprite(17, 1)
  124.   puppetSprite(12, 1)
  125.   puppetSprite(13, 1)
  126.   puppetSprite(14, 1)
  127.   set the visible of sprite 36 to 0
  128.   set the visible of sprite 37 to 0
  129.   set the visible of sprite 38 to 0
  130.   updateStage()
  131.   if (the locV of sprite 12 > 217) and (the mouseH > 186) and (the visible of sprite 5 = 1) then
  132.     set the locV of sprite 14 to 235
  133.     set the locH of sprite 14 to 558
  134.     set the visible of sprite 5 to 0
  135.     set the castNum of sprite 17 to 19
  136.     set the visible of sprite 17 to 1
  137.     set topupied to 1
  138.     SHWUNK()
  139.     updateStage()
  140.   else
  141.     if (the locV of sprite 12 > 217) and (the mouseH < 186) and (the visible of sprite 7 = 1) then
  142.       set the locV of sprite 13 to 221
  143.       set the locH of sprite 13 to 471
  144.       set the visible of sprite 7 to 0
  145.       set the castNum of sprite 17 to 22
  146.       set the visible of sprite 17 to 1
  147.       set topupied to 3
  148.       SHWUNK()
  149.       updateStage()
  150.     else
  151.       if (the locV of sprite 12 < 217) and (the visible of sprite 6 = 1) then
  152.         set the locV of sprite 12 to 210
  153.         set the locH of sprite 12 to 481
  154.         set the visible of sprite 6 to 0
  155.         dontcover()
  156.         set topupied to 2
  157.         SHWUNK()
  158.         updateStage()
  159.       else
  160.         repeat with x = 5 to 7
  161.           set the visible of sprite x to 0
  162.           updateStage()
  163.         end repeat
  164.       end if
  165.     end if
  166.   end if
  167.   set HELLHOLE to 0
  168.   checkpoker()
  169. end
  170.  
  171. on whipitoutBOTTOM
  172.   global origh, origv, GHOR, GVERT, puller, occupied, HELLHOLE
  173.   puppetSprite(puller, 1)
  174.   set the constraint of sprite 8 to 16
  175.   repobottom()
  176.   repeat while the mouseDown
  177.     set delth to the mouseH - GHOR
  178.     set deltv to the mouseV - GVERT
  179.     set the locV of sprite 8 to origv + deltv
  180.     set the locH of sprite 8 to origh + delth
  181.     highlighter()
  182.     updateStage()
  183.     if (the locV of sprite 8 > 232) and (the mouseH > 183) then
  184.       set the visible of sprite 10 to 1
  185.       set the visible of sprite 9 to 0
  186.       set the visible of sprite 8 to 0
  187.       updateStage()
  188.       next repeat
  189.     end if
  190.     if (the locV of sprite 8 < 225) and (the mouseH < 183) then
  191.       set the visible of sprite 8 to 0
  192.       set the visible of sprite 10 to 0
  193.       set the visible of sprite 9 to 1
  194.       updateStage()
  195.       next repeat
  196.     end if
  197.     if the locV of sprite 8 < 238 then
  198.       set the visible of sprite 10 to 0
  199.       set the visible of sprite 9 to 0
  200.       set the visible of sprite 8 to 1
  201.       updateStage()
  202.     end if
  203.   end repeat
  204.   puppetSprite(8, 1)
  205.   puppetSprite(9, 1)
  206.   puppetSprite(10, 1)
  207.   puppetSprite(11, 1)
  208.   if (the locV of sprite 8 > 232) and (the visible of sprite 5 = 1) then
  209.     set the locV of sprite 10 to 233
  210.     set the locH of sprite 10 to 559
  211.     set the visible of sprite 5 to 0
  212.     set the castNum of sprite 11 to 19
  213.     set occupied to 1
  214.     set the visible of sprite 11 to 1
  215.     SHWUNK()
  216.     updateStage()
  217.   else
  218.     if (the locV of sprite 8 < 238) and (the visible of sprite 7 = 1) then
  219.       set the locV of sprite 8 to 232
  220.       set the locH of sprite 8 to 466
  221.       set the visible of sprite 7 to 0
  222.       set the castNum of sprite 11 to 22
  223.       set occupied to 3
  224.       set the visible of sprite 11 to 1
  225.       SHWUNK()
  226.       updateStage()
  227.     else
  228.       if (the locV of sprite 8 < 225) and (the visible of sprite 6 = 1) then
  229.         set the locV of sprite 9 to 220
  230.         set the locH of sprite 9 to 480
  231.         set the visible of sprite 6 to 0
  232.         set the castNum of sprite 11 to 20
  233.         set occupied to 2
  234.         set the visible of sprite 11 to 1
  235.         SHWUNK()
  236.         updateStage()
  237.       else
  238.         repeat with x = 5 to 7
  239.           set the visible of sprite x to 0
  240.           updateStage()
  241.         end repeat
  242.       end if
  243.     end if
  244.   end if
  245.   set HELLHOLE to 0
  246.   checkpoker()
  247. end
  248.  
  249. on setpoint
  250.   global puller, origv, origh
  251.   set origv to the locV of sprite puller
  252.   set origh to the locH of sprite puller
  253. end
  254.  
  255. on highlighter1
  256.   global occupied, ZING
  257.   if (the visible of sprite 6 = 1) or (the visible of sprite 7 = 1) then
  258.     exit
  259.   else
  260.     if occupied <> 1 then
  261.       LIGHTERSOUND()
  262.       set the visible of sprite 5 to 1
  263.     end if
  264.   end if
  265. end
  266.  
  267. on highlighter2
  268.   global occupied, ZING
  269.   if (the visible of sprite 7 = 1) or (the visible of sprite 5 = 1) then
  270.     exit
  271.   else
  272.     if occupied <> 2 then
  273.       LIGHTERSOUND()
  274.       set the visible of sprite 6 to 1
  275.       set ZING to 1
  276.     end if
  277.   end if
  278. end
  279.  
  280. on highlighter3
  281.   global occupied, ZING
  282.   if (the visible of sprite 6 = 1) or (the visible of sprite 5 = 1) then
  283.     exit
  284.   else
  285.     if occupied = 2 then
  286.       LIGHTERSOUND()
  287.       set the visible of sprite 36 to 1
  288.       set ZING to 1
  289.     else
  290.       if occupied <> 3 then
  291.         LIGHTERSOUND()
  292.         set the visible of sprite 7 to 1
  293.         set ZING to 1
  294.       end if
  295.     end if
  296.   end if
  297. end
  298.  
  299. on repoman
  300.   set the locH of sprite 8 to 735
  301.   set the locV of sprite 8 to 224
  302.   set the locH of sprite 12 to 728
  303.   set the locV of sprite 12 to 200
  304.   set the visible of sprite 8 to 1
  305.   set the visible of sprite 12 to 1
  306.   updateStage()
  307. end
  308.  
  309. on topshaker
  310.   repeat with x = 1 to random(8)
  311.     set the castNum of sprite 12 to 5
  312.     puppetSound("waspshake")
  313.     updateStage()
  314.     set the castNum of sprite 12 to 6
  315.     updateStage()
  316.   end repeat
  317.   puppetSound(0)
  318. end
  319.  
  320. on bottomshaker
  321.   if the castNum of sprite 8 = 6 then
  322.     set y to 8
  323.   else
  324.     set y to 10
  325.   end if
  326.   repeat with x = 1 to random(8)
  327.     set the castNum of sprite y to 5
  328.     puppetSound("waspshake")
  329.     updateStage()
  330.     set the castNum of sprite y to 6
  331.     updateStage()
  332.   end repeat
  333.   puppetSound(0)
  334. end
  335.  
  336. on backshaker
  337.   repeat with x = 1 to random(8)
  338.     set the visible of sprite 19 to 1
  339.     puppetSound("waspshake")
  340.     updateStage()
  341.     set the visible of sprite 19 to 0
  342.     updateStage()
  343.   end repeat
  344.   puppetSound(0)
  345. end
  346.  
  347. on dontcover
  348.   global occupied
  349.   if occupied = 3 then
  350.     puppetSprite(17, 1)
  351.     set the castNum of sprite 17 to 21
  352.     set the visible of sprite 17 to 1
  353.     updateStage()
  354.   else
  355.     set the castNum of sprite 17 to 20
  356.     set the visible of sprite 17 to 1
  357.     updateStage()
  358.   end if
  359. end
  360.  
  361. on checkpoker
  362.   if (the visible of sprite 11 = 1) and (the visible of sprite 17 = 1) then
  363.     set the visible of sprite 30 to 1
  364.     updateStage()
  365.   else
  366.     set the visible of sprite 30 to 0
  367.     updateStage()
  368.   end if
  369. end
  370.  
  371. on WARNING
  372.   set the visible of sprite 39 to 1
  373.   puppetSound("PIGS IN SPACE")
  374.   updateStage()
  375.   wait(45)
  376.   puppetSound(0)
  377.   set the visible of sprite 39 to 0
  378.   updateStage()
  379. end
  380.  
  381. on translator
  382.   global symbol
  383.   set symbol to the castNum of sprite 25 + 17
  384.   if rollOver(25) = 1 then
  385.     set the castNum of sprite 26 to symbol
  386.     puppetSprite(26, 1)
  387.     tone()
  388.   else
  389.     set the castNum of sprite 26 to symbol + 17
  390.     puppetSprite(26, 1)
  391.   end if
  392. end
  393.  
  394. on scrollright
  395.   if the castNum of sprite 23 < 145 then
  396.     puppetSound("generic")
  397.     repeat with x = 23 to 26
  398.       puppetSprite(x, 1)
  399.       set the castNum of sprite x to the castNum of sprite x + 1
  400.     end repeat
  401.     updateStage()
  402.     wait(30)
  403.   else
  404.     puppetSound("generic")
  405.     set the castNum of sprite 23 to 140
  406.     set the castNum of sprite 24 to 140
  407.     set the castNum of sprite 25 to 148
  408.     set the castNum of sprite 26 to 182
  409.     updateStage()
  410.     wait(30)
  411.   end if
  412.   puppetSound(0)
  413. end
  414.  
  415. on scrollleft
  416.   if the castNum of sprite 23 > 140 then
  417.     puppetSound("generic")
  418.     repeat with x = 23 to 26
  419.       puppetSprite(x, 1)
  420.       set the castNum of sprite x to the castNum of sprite x - 1
  421.     end repeat
  422.     updateStage()
  423.     wait(30)
  424.   else
  425.     puppetSound("generic")
  426.     set the castNum of sprite 23 to 145
  427.     set the castNum of sprite 24 to 145
  428.     set the castNum of sprite 25 to 153
  429.     set the castNum of sprite 26 to 187
  430.     updateStage()
  431.     wait(30)
  432.   end if
  433.   puppetSound(0)
  434. end
  435.  
  436. on gowhere
  437.   if (the castNum of sprite 11 = the number of cast "one") and ((the castNum of sprite 17 = the number of cast "two") or (the castNum of sprite 17 = the number of cast "two.B")) then
  438.     set the castNum of sprite 24 to the number of cast "2.slant"
  439.   else
  440.     if (the castNum of sprite 11 = the number of cast "one") and (the castNum of sprite 17 = the number of cast "three") then
  441.       set the castNum of sprite 24 to the number of cast "3.slant"
  442.     else
  443.       if (the castNum of sprite 11 = the number of cast "three") and ((the castNum of sprite 17 = the number of cast "two") or (the castNum of sprite 17 = the number of cast "two.B")) then
  444.         set the castNum of sprite 24 to the number of cast "1.slant"
  445.       else
  446.         if (the castNum of sprite 11 = the number of cast "three") and (the castNum of sprite 17 = the number of cast "one") then
  447.           set the castNum of sprite 24 to the number of cast "6.slant"
  448.         else
  449.           if ((the castNum of sprite 11 = the number of cast "two") or (the castNum of sprite 17 = the number of cast "two.B")) and (the castNum of sprite 17 = the number of cast "three") then
  450.             set the castNum of sprite 24 to the number of cast "4.slant"
  451.           else
  452.             if ((the castNum of sprite 11 = the number of cast "two") or (the castNum of sprite 17 = the number of cast "two.B")) and (the castNum of sprite 17 = the number of cast "one") then
  453.               set the castNum of sprite 24 to the number of cast "5.slant"
  454.             end if
  455.           end if
  456.         end if
  457.       end if
  458.     end if
  459.   end if
  460. end
  461.  
  462. on whereyaheadin
  463.   global flywhere
  464.   if the castNum of sprite 24 = the number of cast "1.slant" then
  465.     set flywhere to 1
  466.   else
  467.     if the castNum of sprite 24 = the number of cast "2.slant" then
  468.       set flywhere to 2
  469.     else
  470.       if the castNum of sprite 24 = the number of cast "3.slant" then
  471.         set flywhere to 3
  472.       else
  473.         if the castNum of sprite 24 = the number of cast "4.slant" then
  474.           set flywhere to 4
  475.         else
  476.           if the castNum of sprite 24 = the number of cast "5.slant" then
  477.             set flywhere to 5
  478.           else
  479.             set flywhere to 6
  480.           end if
  481.         end if
  482.       end if
  483.     end if
  484.   end if
  485. end
  486.  
  487. on CUMINSIDE
  488.   global flywhere
  489.   if flywhere = 1 then
  490.     set the visible of sprite 8 to 1
  491.     set the visible of sprite 12 to 1
  492.     updateStage()
  493.   else
  494.     if flywhere = 2 then
  495.       set the visible of sprite 10 to 1
  496.       set the visible of sprite 12 to 1
  497.       updateStage()
  498.     else
  499.       if flywhere = 3 then
  500.         set the visible of sprite 10 to 1
  501.         set the visible of sprite 13 to 1
  502.         updateStage()
  503.       else
  504.         if flywhere = 4 then
  505.           set the visible of sprite 9 to 1
  506.           set the visible of sprite 13 to 1
  507.           updateStage()
  508.         else
  509.           if flywhere = 5 then
  510.             set the visible of sprite 9 to 1
  511.             set the visible of sprite 14 to 1
  512.             updateStage()
  513.           else
  514.             if flywhere = 6 then
  515.               set the visible of sprite 8 to 1
  516.               set the visible of sprite 14 to 1
  517.               updateStage()
  518.             end if
  519.           end if
  520.         end if
  521.       end if
  522.     end if
  523.   end if
  524. end
  525.  
  526. on hidelaunch
  527.   set the visible of sprite 6 to 0
  528.   set the visible of sprite 41 to 1
  529.   puppetSprite(8, 0)
  530.   updateStage()
  531. end
  532.  
  533. on targetupdown
  534.   set the constraint of sprite 3 to 2
  535.   set r to random(2)
  536.   if r = 1 then
  537.     set the locV of sprite 3 to the locV of sprite 3 - 7
  538.   else
  539.     set the locV of sprite 3 to the locV of sprite 3 + 7
  540.   end if
  541.   updateStage()
  542. end
  543.  
  544. on targetleftright
  545.   set the constraint of sprite 3 to 2
  546.   set r to random(2)
  547.   if r = 1 then
  548.     set the locH of sprite 3 to the locH of sprite 3 - 7
  549.   else
  550.     set the locH of sprite 3 to the locH of sprite 3 + 7
  551.   end if
  552.   updateStage()
  553. end
  554.  
  555. on reverso
  556.   set the ink of sprite 3 to 2
  557.   updateStage()
  558. end
  559.  
  560. on instruct
  561.   set the castNum of sprite 4 to 180
  562.   updateStage()
  563.   tone()
  564. end
  565.  
  566. on tippytop
  567.   global puller
  568.   if (puller = 8) or (puller = 9) or (puller = 10) then
  569.     exit
  570.   else
  571.     set the visible of sprite 36 to 1
  572.     set the visible of sprite 37 to 1
  573.     set the visible of sprite 38 to 1
  574.     set the visible of sprite 12 to 0
  575.   end if
  576. end
  577.  
  578. on tone
  579.   global onesound
  580.   if onesound = 0 then
  581.     puppetSound("toneup")
  582.     updateStage()
  583.     wait(60)
  584.     puppetSound(0)
  585.     set onesound to 1
  586.   else
  587.     exit
  588.   end if
  589. end
  590.  
  591. on HEREITCOMES
  592.   set the visible of sprite 5 to 1
  593.   puppetSound("BU-BUMP")
  594.   updateStage()
  595. end
  596.  
  597. on EYEGLOW
  598.   global onesound
  599.   set the visible of sprite 1 to 1
  600.   set the visible of sprite 2 to 1
  601.   updateStage()
  602.   if onesound = 0 then
  603.     puppetSound("PIGS IN SPACE")
  604.     updateStage()
  605.     wait(60)
  606.     puppetSound(0)
  607.     set onesound to 1
  608.   else
  609.     continue()
  610.   end if
  611. end
  612.  
  613. on fourships
  614.   global attackearth
  615.   if the castNum of sprite 2 = 41 then
  616.     set attackearth to attackearth + 1
  617.   else
  618.     nothing()
  619.   end if
  620. end
  621.  
  622. on TAFFYPULLER
  623.   set L to random(3) + 4
  624.   puppetSound("GENERIC")
  625.   updateStage()
  626.   if the visible of sprite L = 1 then
  627.     set the visible of sprite L to 0
  628.     updateStage()
  629.   else
  630.     if the visible of sprite L = 0 then
  631.       set the visible of sprite L to 1
  632.       updateStage()
  633.     end if
  634.   end if
  635. end
  636.  
  637. on SHWUNK
  638.   puppetSound("SWISH")
  639.   updateStage()
  640.   wait(20)
  641.   puppetSound("INSERT")
  642.   updateStage()
  643.   wait(15)
  644.   puppetSound(0)
  645. end
  646.  
  647. on LIGHTERSOUND
  648.   if (the visible of sprite 5 = 1) or (the visible of sprite 6 = 1) or (the visible of sprite 7 = 1) or (the visible of sprite 36 = 1) then
  649.     exit
  650.   else
  651.     puppetSound("ZHWOW")
  652.     updateStage()
  653.     wait(20)
  654.     puppetSound(0)
  655.     set ZING to 1
  656.   end if
  657. end
  658.  
  659. on armaction
  660.   puppetSprite(8, 1)
  661.   set the locV of sprite 8 to 295
  662.   set the locH of sprite 8 to 307
  663.   set the castNum of sprite 8 to 174
  664.   updateStage()
  665. end
  666.